package controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import po.Line;
import service.LineService;

/**
 * Created by apple on 2017/10/23.
 */

@Controller
public class LineController {

    @Autowired
    private LineService lineService;

    @RequestMapping(value = "/updateLine.do", produces = "text/html;charset=UTF-8")
    @ResponseBody
    public String updateLine(Line line) {
        lineService.updateLineInfo(line);
        return lineService.selectLineByLineId(line.getLineid()).toString();
    }
}
